﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="faqcontent.ascx.cs" Inherits="faqcontent" %>


<asp:TextBox ID="Txtcategory" runat="server" Visible="False" Text="2"></asp:TextBox>
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
    <ItemTemplate>
         
		
		<h3 class="orangetitle">问：<%#Eval ("Title")%></h3>
	    <div class="panel" align="justify">
		    <span class="bodytext"><br /><br />
		        <%#Eval ("content") %>
		     </span>
	    </div>
	 
    </ItemTemplate>
</asp:Repeater>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:GoWLLConnectionString %>" 
    
    SelectCommand="SELECT * FROM [GowllFaq] WHERE ([category] = @category)" 
    DeleteCommand="DELETE FROM [GowllFaq] WHERE [ID] = @ID" 
    InsertCommand="INSERT INTO [GowllFaq] ([Title], [content], [category]) VALUES (@Title, @content, @category)" 
    UpdateCommand="UPDATE [GowllFaq] SET [Title] = @Title, [content] = @content, [category] = @category WHERE [ID] = @ID">
    <SelectParameters>
        <asp:ControlParameter ControlID="Txtcategory" DefaultValue="1" Name="category" 
            PropertyName="Text" Type="String" />
    </SelectParameters>
    <DeleteParameters>
        <asp:Parameter Name="ID" Type="Int32" />
    </DeleteParameters>
    <UpdateParameters>
        <asp:Parameter Name="Title" Type="String" />
        <asp:Parameter Name="content" Type="String" />
        <asp:Parameter Name="category" Type="String" />
        <asp:Parameter Name="ID" Type="Int32" />
    </UpdateParameters>
    <InsertParameters>
        <asp:Parameter Name="Title" Type="String" />
        <asp:Parameter Name="content" Type="String" />
        <asp:Parameter Name="category" Type="String" />
    </InsertParameters>
</asp:SqlDataSource>

